﻿$(function () {
    $("#ContentPlaceHolder1_btnPost").click(function () {
        //$.getJSON方法为get传值，如果数据量过大则会失效，使用post传值则会避免此问题
        radconfirm('确定上报企业信息？', Post, 300, 150, null, '提示');
        return false;
        function Post(arg) {
            if (arg) {
                $.getJSON("../Handlers/EnterpriseCorpInfoHandler.ashx", { "action": "Post", "rand": Math.random() }, function (data) {
                    if (data.Result == true) {
                        $.ligerDialog.warn(data.Message);
                        Refresh();
                        return;
                    }
                    else {
                        $.ligerDialog.warn(data.Message);
                        return;
                    }
                }
        );
            }
        }
    }
    );
    var checkEmbranchMent = setTimeout(function () {
        var embranchMentCount = $("input:hidden[id$='hdnEmbranchMentCount']").val();
        if (embranchMentCount == null || embranchMentCount == "" || embranchMentCount == "0") {
            window.radopen("../Enterprise/EnterpriseMarketsInfo.aspx", "radWindowMarket");
            return false;
        }
    }, 1000);
}
);

function AddCorpTab() {
    top.tab.addTabItem({ tabid: new Date().getTime(), text: "企业信息管理", url: "Enterprise/EnterpriseCorpInfo.aspx" });
}

